#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    mainWidget = new GLWindow;
    mainWidget->setUi(ui);
    ui->glLayout->addWidget(mainWidget);
//    setCentralWidget(mainWidget);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::keyPressEvent(QKeyEvent *ke)
{
    mainWidget->keyPressEvent(ke);
}

void MainWindow::keyReleaseEvent(QKeyEvent *ke)
{
    mainWidget->keyReleaseEvent(ke);
}

/*bool MainWindow::event(QEvent *event)
{

}*/
